#include "stdafx.h"
#include "ConfigManager.h"

ConfigManager::ConfigManager(int smode, int sinterval, int uindex) 
: say_mode_(smode),
  say_interval_(sinterval),
  user_start_index_(uindex),
  io_count_(0)
{

}

int ConfigManager::open()
{
	char inetAddr[128] = {0};
	sprintf(inetAddr, "%s:%d", "127.0.0.1", 9000);
	
	return connect_addr_.set(inetAddr);
}

void ConfigManager::increase_io_count()
{
	std::cout << "IO Count" << ++this->io_count_ << std::endl;
}

void ConfigManager::decrease_io_count()
{
	std::cout << "IO Count" << --this->io_count_ << std::endl;
}

void ConfigManager::add_client(DummyHandler* client)
{
	clinet_list_.push_back(client);
}

void ConfigManager::remove_client(DummyHandler* client)
{
	
}
